package com.example.pro1.config.lian;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyBatisPlusConfig {
    /*分页插件配置*/
    @Bean
    /*配置分页插件*/
    public MybatisPlusInterceptor MybatisPlusInterceptor(){
        MybatisPlusInterceptor MybatisPlusInterceptor = new MybatisPlusInterceptor();
        /*用来配置mybatisPlux的插件*/
        MybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
        return MybatisPlusInterceptor;
    }
}
